package com.remenote.remenoteback.entity.doo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

/**
 * @BelongsProject: remenote-back
 * @BelongsPackage: com.remenote.remenoteback.entity.doo
 * @Author: 23392
 * @CreateTime: 2024-03-24  16:13
 * @Description: TODO
 * @Version: 1.0
 */
@Getter
@Setter
@Entity
@Table(name = "NOTEBOOK")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
public class NotebookDo implements Serializable, Cloneable {
    private String tenantId;
    private Integer revision;
    @CreatedBy
    private String createdBy;
    @CreatedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;
    @LastModifiedBy
    private String updatedBy;
    @LastModifiedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;
    @Id
    @GeneratedValue
    private Integer id;
    private String username;
    private String notebook;
    private Integer notebookId;
    private String description;
    private Boolean isPublic=false;
    private Boolean isDelete=false;
}
